home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-01-15 | 29.7 KB | 1,418 lines |
-
-
-
-
-
-
-
- CHAPTER 6 - PRINTING
-
-
- PRINT COMMAND
-
-
- Edit Search >Print< Files Utilities Quit
- Print Form Sheet Direct Codes Hardware Top
-
-
- Press [P] in response to the Main Menu to issue any of the following
- commands:
-
-
- Print: Print a group of records.
-
- Form: Specify the format for printing records.
-
- Sheet: Specify page length and margins.
- Specify whether each record is printed on a separate page.
- Specify whether the program pauses before printing a new
- page.
-
- Direct: Send text or codes directly to the printer.
-
- Codes: Specify the printer codes for underline and bold.
-
- Hardware: Select the printer port and specify whether a carriage
- return and new line feed are to sent to the printer
- at the end of each line.
-
- Top: Set the printer to the top of a page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 57
-
-
-
-
-
- 3by5
-
- PRINT COMMAND: PRINT MENU
-
-
- >Print< Form Sheet Direct Codes Hardware Top
- Print records from a file
-
-
- The Print Menu's Print Command is used to print a group of records to a
- printer. The records are printed by record number and may be sorted
- alphabetically (3by5 and 3by5 Plus). To print a group of records by a
- search key, use the Search Command.
-
-
- Press [P] to print. If more than one file is open, the program will
- ask you to select the file for printing. It will the display the
- following message:
-
-
- From file FILENAME print records:
- Records in file: zzzzz
-
-
-
- The number of records in the file will be displayed. Type the starting
- record number and press <Enter>. Then type the ending record number
- and press <Enter>.
-
- The program will then ask you:
-
-
- From file FILENAME print records:
- Sort records? (Y/N)
-
-
- If you press [N], the program will start printing the records in
- numerical sequence.
-
- If you pressed [Y] to sort the records, the program will begin to sort
- the records by the first line of text if there are no fields in the
- file. Otherwise, the program will display the names of the fields and
- ask for primary and secondary sort fields. If you want to sort by one
- field alone, just press <Enter> in response to the secondary field
- prompt.
-
- With the 3by5 Starter Kit you may sort only the first 20 records of a
- file.
-
- Aborting printing: To abort a printing session, press <Esc>.
-
-
-
- 58
-
-
-
-
-
- PRINTING
-
- FORM COMMAND
-
-
- Print >Form< Sheet Direct Codes Hardware Top
- Select print format
-
-
-
- This command is used to specify a format for printing records. Formats
- for printing records are stored standard 3by5 file records and are
- called PRINT FORMS. In response to the Print Command, press [F] for
- the Form Command. The program will ask you for the number of the file
- that contains the print form:
-
-
- File:
- Enter number of file with print form. 0 = standard listing
-
-
-
- Type the file number. The program will then ask for the number of
- the record that contains the print form you want to use. Type the
- record number and press <Enter>. The print form will be loaded into
- memory and any records printed will be printed in the format specified
- by that record.
-
- If you want to reset the program to the standard format for printing,
- type [0] <Enter>.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 59
-
-
-
-
-
- 3by5
-
- STANDARD FORM
-
- The standard print format is to print one record after another. The
- record number is printed before the record, all fields are included and
- the record is followed by a blank line. There is a six line top margin
- with the name of the file on the second line and a six line bottom
- margin. For example:
-
- ---------------------------------------------------------------
-
- REF.3x5
-
-
-
-
- 22
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
-
- 23
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
-
- 24
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983.
-
-
-
- ---------------------------------------------------------------
-
- Many other formats are possible. The formats are stored in standard
- 3by5 files as PRINT FORMS. Your 3by5 master diskette has a file
- FORM.3X5 with sample print forms. The forms will be reviewed as an
- introduction to printing with 3by5. Once you load a print form into
- memory, you may close the file that contained the print form.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 60
-
-
-
-
-
- PRINTING
-
- Print forms define the way in which text will be printed. Any text in
- the form will be printed. The "@" symbol is used as an instruction for
- printing specific information (e.g. fields, field names, file names,
- etc.)
-
-
- PRINT FORM: EXAMPLE 1
-
-
- @A<
-
-
-
- Record one of FORM.3X5 contains the simplest print form. It is designed
- for printing from a file with no fields or at most one field (e.g. file
- REF.3X5).
-
- The "@A" on the first line indicates that the contents of field A will
- be printed. The field letter must be in upper case for the contents to
- be printed. IN THIS CASE FILE REF.3X5 HAS NO FIELDS AND THE ENTIRE
- RECORD IS CONSIDERED TO BE FIELD A.
-
- The "<" symbol indicates the carriage return mark that result from
- pressing the <Enter> key.
-
- If a field is longer than one line, the following lines of print will
- be adjusted downward.
-
- This print form will result in one record being printed after another.
- Assuming that the Sheet Command settings are unchanged, there will be a
- top margin of six blank lines and a bottom margin of six blank lines.
-
- No spaces will be printed between records.
-
- The results of using this FORM with file REF.3x5 are shown on the next
- page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 61
-
-
-
-
-
- 3by5
-
- ---------------------------------------------------------------
-
-
-
-
-
-
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983.
- // //
-
-
- ---------------------------------------------------------------
-
- Note that there is a standard top margin of 6 lines and a standard
- bottom margin of 6 lines. Since no headers or footers were defined,
- there is no text in either the top or bottom margins.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 62
-
-
-
-
-
- PRINTING
-
- PRINT FORM: EXAMPLE 2 (Blank lines between records)
-
-
- @A<
- <
-
- Record two of FORM.3X5 contains a record format that is very similar to
- record one of FORM.3X5. The only difference is that there is a
- carriage return on line two. This will result in a blank line being
- printed after each record.
-
- The results of using this FORM with file REF.3x5 would be:
-
- ---------------------------------------------------------------
-
-
-
-
-
-
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
-
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
-
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983.
- // //
-
-
-
-
-
-
-
-
- ---------------------------------------------------------------
-
- In this case the blank line with a carriage return in the form record
- causes a blank line to be printed between records. If there were two
- blank lines in the print form record, there would be two blank lines
- between records in the printout.
-
-
-
-
-
-
-
-
- 63
-
-
-
-
-
- 3by5
-
- PRINT FORM: EXAMPLE 3 (Record numbers)
-
-
- RECORD NUMBER: @#
- @A<
- <
-
-
-
- Record three of FORM.3X5 contains a record format that is very similar
- to record two of FORM.3X5. The only difference is that the first line
- contains the text "RECORD NUMBER:" and is followed by the symbol
- "@#". The text "RECORD NUMBER:" will be printed on the line before
- each reference and will be followed by the number of the record. The
- "@#" symbol can appear anywhere on a print form (except the header or
- footer).
-
- The results of using this FORM with file REF.3x5 would be:
-
- ---------------------------------------------------------------
-
-
-
-
-
-
- RECORD NUMBER: 22
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
-
- RECORD NUMBER: 23
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
-
- RECORD NUMBER: 24
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983
- // //
-
-
-
-
-
-
-
-
- ---------------------------------------------------------------
-
-
-
-
- 64
-
-
-
-
-
- PRINTING
-
- PRINT FORM: EXAMPLE 4 (Headers)
-
-
- @.<
- @.REFERENCES FROM FILE: @*<
- @.<
- @.<
- @.<
- @.<
- REC# @#<
- @A<
- ------------------------<
-
-
- Record four of FORM.3X5 contains a record format that is similar
- to record three of FORM.3X5. The differences are:
-
- Six header lines have be added. The symbol "@." at the start of a
- line indicates a header or footer. If the "@." symbol is at the top of
- a print form, it indicates a header. If it is at the bottom of a print
- form, it indicates a footer.
-
- The second line of the print form is a header line. It contains the
- text :REFERENCES FROM FILE:", followed by the symbol "@*". The symbol
- "@*" indicates that the name of the file being printed should be
- included at that location.
-
- Line nine of the print form has a dashed line. It will separate
- records.
-
- The results of using this FORM with file REF.3x5 are shown on the next
- page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 65
-
-
-
-
-
- 3by5
-
- ---------------------------------------------------------------
-
- REFERENCES FROM FILE: REF.3X5
-
-
-
-
- REC# 22
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
- ---------------
- REC# 23
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
- ---------------
- REC# 24
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983.
- ---------------
- // //
-
-
-
-
-
-
-
-
- ---------------------------------------------------------------
-
-
-
-
-
-
- A header may contain any text you want to print. It is not necessary
- to include all the lines of a header. If you do not specify the text
- for a header line, it will be printed as a blank line.
-
-
-
-
-
-
-
-
-
-
-
-
-
- 66
-
-
-
-
-
- PRINTING
-
- PRINT FORM: EXAMPLE 5 (Headers and Footers)
-
-
- @.<
- @.REFERENCES FROM FILE: @*<
- @.<
- @.<
- @.<
- @.<
- @* REC# @#
- @A<
- ------------------------
- @.
- @.*****************************************
-
-
- Record five of FORM.3X5 contains a record format that is similar
- to record four of FORM.3X5. The first two footer lines have been
- defined: the first footer line is blank and the second contains a row
- of asterisks.
-
- The results of using this print form with file REF.3x5 are shown on the
- next page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 67
-
-
-
-
-
- 3by5
-
- ---------------------------------------------------------------
-
- REFERENCES FROM FILE: REF.3X5
-
-
-
-
- REF.3X5 REC# 22
- Knuth, D.E.: The Art of Computer Programing. Vol 3. Reading,
- Massachusetts: Addison-Wesley, 1973.
- ---------------
- REF.3X5 REC# 23
- Harrison, M.C.: Implementation of the Substring Test by Hash-
- ing. CACM 14:777-779, 1971.
- ---------------
- REF.3X5 REC# 24
- Trojak, J.E.: Finding the Search Solution: Signature Screening.
- 80 Micro p. 100, December, 1983.
- ---------------
- // //
-
- ***************************************************************
-
-
-
-
- ---------------------------------------------------------------
-
- As with a header, it is necessary to only define those lines of a
- footer that you want to contain text (or other characters such as the
- asterisks above).
-
- Note that in the above example, the file name and record number are
- printed before each record. It is shown just to demonstrate that a
- file name can be placed anywhere within a record and anywhere on a
- page. The record number was intentionally moved to the right side of
- the page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 68
-
-
-
-
-
- PRINTING
-
- PRINT FORM: EXAMPLE 6 (Multiple Fields)
-
-
- @.<
- @.@*<
- @.<
- @.<
- @.<
- @.<
- @a @A REC# @#<
- @b @B<
- @c @C<
- <
- @d @D<
- <
-
-
- Record 6 of FORMS.3X5 is designed for use with file ADDRESS.3X5 of your
- 3by5 master diskette. ADDRESS.3X5 has four fields:
-
- A: Name field
- B: Address field (street, city, state, zip, etc.)
- C: Phone number(s)
- D: Comments
-
- In this example the name of the file will be printed in the second line
- of the top margin.
-
- The "@a" symbol indicates that the name of the A field should be
- printed, while the "@A" symbol indicates that the contents of the A
- field should be printed. If the "@" symbol is followed by a lower case
- letter, the name of a field is printed; if it is followed by an upper
- case letter, the contents of the field are printed.
-
- The single carriage return on line 10 causes a blank line to be printed
- between the telephone field and the comments field.
-
- If a field contains several lines, the following lines of print will be
- adjusted downward.
-
-
-
-
-
-
-
-
-
-
-
-
- 69
-
-
-
-
-
- 3by5
-
- PRINT FORM: EXAMPLE 7 (Mailing labels)
-
-
- @A<
- @B
-
-
-
- Record 7 of FORMS.3X5 is designed for use with file ADDRESS.3X5 of your
- 3by5 master diskette. It will print mailing labels containing the name
- and address fields. As note in Example 6, ADDRESS.3X5 has four
- fields:
-
- A: Name field
- B: Address field (street, city, state, zip, etc.)
- C: Phone number(s)
- D: Comments
-
-
- IN THIS EXAMPLE IT IS NECESSARY TO ALSO USE THE SHEET COMMAND TO SET
- THE FOLLOWING PARAMETERS:
-
- Page length = 6 (assumes five lines per label and one in between)
- Top Margin = 0
- Bottom Margin = 0
- Form = Y
-
- The left and right margins and pause command can be set as needed.
-
- The above settings will eliminate the printing of a header or footer
- (top and bottom margins = 0). Each label will be treated as a page
- (Form = Y). See page 72 for information on using the Sheet Command.
-
- The format of the record is simple. On line one the name of the person
- in field A will be printed. On line two, the address will begin. It
- may be up to 5 lines long. One record is printed per page (label)
- since the Form Command was set to "Y".
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 70
-
-
-
-
-
- PRINTING
-
- PRINT FORM: EXAMPLE 8 (Sheet Command line)
-
-
- @$ 6 10 80 0 0 Y N<
- TO: @A<
- @B
-
-
-
- Record 8 of FORMS.3X5 is similar to record 7 and will print mailing
- labels from file ADDRESS.3X5. The major difference is that it contains
- a Sheet Command line.
-
- This line defines the page length, left and right margins, top and
- bottom margins, Form Parameter and Pause Parameter.
-
- The Sheet Command line must be the first line of a print form and it
- must begin with a "@$" symbol. The values entered are:
-
- Page length
- Left margin
- Right margin
- Top margin
- Bottom margin
- Form Parameter
- Pause Parameter
-
- All values must be entered in the above order. One or more spaces
- separate each value.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 71
-
-
-
-
-
- 3by5
-
- APPENDING FIELDS
-
- Sometimes you may want to append several fields together. For example,
- you may have a file with the following fields:
-
- A Last name
- B First name
- C Street address
- D City
- E State
- F ZIP Code
-
- You can append the last name and first name fields together to get one
- name. Similarly the City, State and Zip Code fields can be appended.
-
- The rule for appending fields is as follows:
-
- After the initial "@" symbol, there is a field letter. This is
- followed immediately by another "@" which may be followed by a
- character to be printed or by another field name.
-
- For example:
-
- @B@ @A will print the first name, a space, and the
- last name.
-
- @D@ @E@ @F will print the city, a space, the state, a
- space, and the ZIP Code.
-
-
- The ability to append fields has been added to 3by5 at the request of
- users who sort 3by5 records by ZIP Code or state and want to be able to
- print labels with the city, state and ZIP Code on one line.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 72
-
-
-
-
-
- PRINTING
-
- PRINT FORM CODES
-
- 3by5 used the "@' symbol to signify a print form command. The fol-
- lowing codes may be used:
-
- @A designates that the contents for field A will be printed at the
- location of the "@" symbol. The field must be specified as an
- upper case letter (i.e. A - O).
-
- @a designates that the name of the field will be printed at the
- location of the "@" (i.e. a - o).
-
- @# designates that the current record number will be printed at
- the location of the "@". The "#" symbol may be followed by a
- "-" sign to specify that the record number will be left justified.
- A "0" (zero) designates zero filling of any blank spaces.
- Finally, a digit form 1 to 9 may be used to specify the number
- of spaces in the record field. The rules are those used by the
- C language function printf().
-
- @* The current file name will be printed
-
- @. The line is a header or footer
-
- @$ The sheet format control line. This command can appear only as
- the first two characters of the first line. It must be
- followed by the page length, left margin, right, top margin,
- bottom margin, form parameter and pause parameter settings. For
- example:
-
- @$ 66 6 6 15 90 Y Y
-
- Each parameter is separated by one or more spaces. The order of
- the parameters is the same as that used by the Sheet Command.
- In the above example, the page length is set to 66, the top
- and bottom margins to 6 lines each, the left margin to column
- 15 and the right margin to column 90. The Form Parameter is set
- to "Y" as is the pause Parameter.
-
- @= This symbol should appear at the end of a line. It indicates
- that the contents of the line are to be printed on the same
- line as the form line. The text will not be adjusted in an
- upward or downward direction.
-
- @- This symbol should appear at the end of a line. It indicates
- that the contents of the line should be moved up to the last
- printed line of text.
-
-
-
-
- 73
-
-
-
-
-
- 3by5
-
- \xxx A back slash followed by three digits is used to send a printer
- code. The value of the three digits is sent to the printer. For
- example, \027 is sent as 27 (the escape code).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 74
-
-
-
-
-
- PRINTING
-
- SHEET COMMAND
-
-
- Print Form >Sheet< Direct Codes Hardware Top
- Set sheet margins, pause and form options
-
-
-
- The Sheet Command is used to specify the number of lines per page, the
- left, right, top and bottom margins. It also specifies whether one
- record is printed per page and whether there is a pause after a page is
- printed.
-
- Press [S] to specify the Sheet Command. The following screen will
- appear:
-
- -----------------------------------------------------
- | |
- | |
- |Page length: (1 - 999) 66 |
- |Left margin: (1 - 132) 1 |
- |Right margin: (1 - 132) 78 |
- |Top margin: (0 - ) 6 |
- |Bottom margin: (0 - ) 6 |
- |Form: (Y/N) N |
- |Pause: (Y/N) N |
- | |
- | |
- | |
- | |
- |<Esc> Cancel <F10> save |
- -----------------------------------------------------
-
-
- Page len is the length of the page in lines. A standard 8.5 x 11 inch
- page has 66 lines (6 lines per inch). A 3by5 card has 18 lines per
- page.
-
- LM is the left margin for printing to begin. The printer left margin
- is adjusted before a record is printed. For example, if the file left
- margin is 1 and the printer left margin is 10, the printer will be
- spaced 10 blank spaces to the right before printing begins.
-
- RM is the right margin of the printer. Any attempt to print past the
- right margin results in a carriage return and new line feed. In most
- cases if you move the left margin over 20 spaces to the right, you
- should also move the right margin over 20 spaces.
-
- TM is the number of lines the printer will leave at the top of a page
- before printing records. If you specified a heading, it will be
-
- 75
-
-
-
-
-
- 3by5
-
- printed on the second line of the page.
-
- BM is the number of lines the printer will leave at the bottom of the
- page.
-
- FORM PARAMETER designates whether the printer will treat each record as
- a separate form (page). For printing 3x5 cards or large records the
- FORM parameter should be set to "Y". If you are printing references on
- standard 8.5 x 11 inch paper, most likely you will want to print
- several records on a page, in which case FORM should be set to "N".
-
- PAUSE PARAMETER designates that the program will pause after each page
- is printed. This will allow you to insert another sheet of paper.
-
- Type in your new printer parameters and press enter after each value.
- You may use the Up and Down Arrow keys to move form one value to
- another.
-
- When you are finished, press <F10> to save the new values. Press <Esc>
- to cancel any values you have entered.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 76
-
-
-
-
-
- PRINTING
-
- DIRECT COMMAND
-
-
- Print Form Sheet >Direct< Codes Hardware Top
- Type text or printer codes directly to the printer
-
-
- The Direct Command allows you to type a line of text and have it
- printed directly to the printer after you press <Enter>.
-
- Codes may be inserted by using a back slash followed by three decimal
- digits for the code. For example, the line "\027\071" will send codes
- 27 and 71 to the printer and will turn on bold printing on an IBM or
- Epson dot matrix printer.
-
- Press <Esc> when you are finished sending text or codes directly to the
- printer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 77
-
-
-
-
-
- 3by5
-
- CODES COMMAND
-
-
- Print Form Sheet Direct >Codes< Hardware Top
- Set printer codes for underline and bold
-
-
- The Codes Command allows you to specify the printer codes for printing
- bold text and for underlining. 3by5 bold and underline commands are
- set for the IBM or Epson dot matrix printer. If you have another
- printer, you can specify the codes that will be sent to the printer for
- printing bold text and for underlining.
-
- The 3by5 Starter Kit cannot underline or print bold.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 78
-
-
-
-
-
- PRINTING
-
- HARDWARE COMMAND
-
-
- Print Form Sheet Direct Codes >Hardware< Top
- Set hardware parameters
-
-
- The Printer Hardware Command is used to specify the printer port
- (1 or 2) and whether a new line feed should be transmitted to the
- printer after each carriage return. The default printer port is
- #1 and the default end of line is to send a carriage return and
- new line feed.
-
-
- Press [H] for the Hardware Command. The program will display the
- following:
-
-
- Printer 1 New Line Feed Y
- Printer number (1 - 2)
-
-
-
-
- The default printer is number 1. If you want to direct printing
- to port 2, just type [2].
-
- The program will move to the New Line Feed prompt. If your printer
- performs a new line feed after each carriage return, type [N] in
- response to the New Line Feed prompt.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 79
-
-
-
-
-
- 3by5
-
- TOP COMMAND
-
-
- Print Form Sheet Direct Codes Hardware >Top<
- Set printer to top of page
-
-
- The Top Command is used to direct 3by5 that you are setting the printer
- to the top of a new page. It is used if the paper is not aligned
- properly, if you change paper while printing, or if you abort printing
- and want to start on a new page.
-
- Press [T] and the program will prompt you:
-
-
- Set printer to top of page.
- Press <Enter> to continue.
-
-
- Manually position the paper to the top of the page, and press <Enter>.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 80
-